CloseConfirmationDialog

fun CloseConfirmationDialog(_: Nothing = nothing, modifier: Modifier = Modifier, icon: @Composable () -> Unit? = { Icon(imageVector = IconPack.CloudAlertOutline, contentDescription = null) }, title: @Composable () -> Unit? = { Text(text = stringResource(R.string.ly_img_editor_dialog_close_confirm_title)) }, text: @Composable () -> Unit? = { Text(text = stringResource(R.string.ly_img_editor_dialog_close_confirm_text)) }, onDismissRequest: () -> Unit = { showCloseConfirmationDialog = false }, confirmButton: @Composable () -> Unit = { TextButton( onClick = { onDismissRequest() editorContext.eventHandler.send(EditorEvent.CloseEditor()) }, ) { Text(stringResource(R.string.ly_img_editor_dialog_close_confirm_button_confirm)) } }, dismissButton: @Composable () -> Unit? = { TextButton( onClick = onDismissRequest, ) { Text(stringResource(R.string.ly_img_editor_dialog_close_confirm_button_dismiss)) } }, properties: DialogProperties = DialogProperties(dismissOnBackPress = false, dismissOnClickOutside = false), __: Nothing = nothing)

A helper composable function for displaying a confirmation dialog when closing the editor.

Parameters

modifier

the modifier to apply to the dialog.

icon

the icon to display in the dialog.

title

the title of the dialog.

text

the text of the dialog.

confirmButton

the confirm button of the dialog.

dismissButton

the dismiss button of the dialog.

onDismissRequest

executes when the user tries to dismiss the dialog.

properties

the properties of the dialog.